<!-- 电话组件 -->
<template>
  <div
    :style="{
      'background-color': config.ConfigData.bgcolor,
      margin: '0 ' + config.ConfigData.margin + 'px',
      'border-radius': config.ConfigData.parentradius + 'px',
      padding: '0 ' + config.ConfigData.padding + 'px'
    }"
  >
    <div class="phoneview">
      <div class="phonecontent">
        <div
          class="phonetitle"
          :style="{ color: config.ConfigData.titlecolor }"
        >
          联系电话
        </div>
        <div
          class="phonedesc"
          :style="{ color: config.ConfigData.contentcolor }"
        >
          {{ config.ConfigData.telephone }}
        </div>
      </div>
      <div class="phoneicon">
        <i class="iconfont icon-mobilephone "></i>
      </div>
    </div>
  </div>
</template>

<script>
import { isReallyNull } from "@/utils/utils";
export default {
  name: "PhoneCopt",
  props: {
    config: Object
  },
  data() {
    return {};
  },
  methods: {
    callphone() {
      if (isReallyNull(this.config.ConfigData.telephone)) {
        return;
      }
      // wepy.makePhoneCall({
      //   phoneNumber: this.config.ConfigData.telephone
      // });
    }
  },
  mounted() {}
};
</script>

<style lang="scss">
.phoneview {
  height: 76px;
  margin: 0 5px;
  padding: 0 5px;
  background: transparent;
  //border: 1px solid rgba(234, 234, 234, 1);
  box-shadow: 0px 1.5px 5px 0px rgba(122, 122, 122, 0.08);
  border-radius: 3.5px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  .phonecontent {
    display: flex;
    flex-direction: column;
    .phonetitle {
      font-size: 17px;
      font-family: "PingFang-SC-Medium";
      font-weight: 500;
      color: rgba(34, 34, 34, 1);
    }
    .phonedesc {
      margin-top: 10px;
      font-size: 12px;
      font-family: "PingFang-SC-Medium";
      font-weight: 500;
      color: rgba(153, 153, 153, 1);
    }
  }
  .phoneicon {
    width: 35px;
    height: 35px;
    border: 1px solid rgba(19, 131, 245, 1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    i {
      font-size: 18px;
      color: #1383f5;
    }
  }
}
</style>
